Expand description
§Jpeg 2000 image support.
A safe wrapper of openjpeg-sys
for loading/saving Jpeg 2000 images.
§Example: Convert a Jpeg 2000 image to a png image.
use image::DynamicImage;
use jpeg2k::*;
fn main() {
// Load jpeg 2000 file from file.
let jp2_image = Image::from_file("./assets/example.j2k")
.expect("Failed to load j2k file.");
// Convert to a `image::DynamicImage`
let img: DynamicImage = jp2_image.try_into()?;
// Save as png file.
img.save("out.png")?;
}
Modules§
- File format detection.
Structs§
- The area of the source image to decode.
- A Jpeg2000 Image.
- A Jpeg2000 Image Component.
- Image Data.
Enums§
- Image color space.
- Image Data.
- Image Pixel Data.